home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacWorld 1997 February
/
Macworld (1997-02).dmg
/
Games World
/
For Doom⁄Hexen
/
Hexen
/
Cannons
/
CANNONS.ACS
next >
Wrap
Text File
|
1996-01-08
|
32KB
|
1,271 lines
/*
CANNONS Script, Written by Brit Willoughby (12-25-95)
Scripts that run the 4 cannons, moves the platforms up and down,
and change the missles that the cannons fire. The missles are cool!
Scripts that also runs the digital displays! Really cool!
Each player has a seperate script to keep one players delays from
effecting the other players. I think it's the only way to get it to
work right. You can change the defines to suit your needs. :)
*/
#include "common.acs"
/* SWITCH DEFINITIONS */
#define FIRE 0
#define HZ_UP 1
#define HZ_DN 2
#define VT_UP 3
#define VT_DN 4
#define SP_UP 5
#define SP_DN 6
#define OBJ 7
#define PL_UP 8
#define PL_DN 9
/* PLATFORM DIRECTIONS */
#define UP 1
#define STOP 0
#define DN -1
/* WIND VARIANCE Slop, either + or - degrees offset (min is 0) */
#define VARIANCE 4 /* NOTE: Too small, you can't hit target, I like 2-4. */
/* SHOTS FIRED Shots at once, shoots them in a spread (based on variance)! */
#define MAX_SHOTS 10 /* NOTE: Too small, easy to dodge, I like 8-12. */
/* DELAYS */
#define SECONDS 35 /* Used for "delay(2*SECONDS);" = delay(2*35); */
#define TIME_DELAY 1 /* Small delay for sounds */
#define FIRE_DELAY 2 /* 2 Second delay between shots */
#define BUTTON_DELAY 8 /* Delay between button pushes */
#define DISPLAY_DELAY 4 /* Delay between changing digits */
/* PLATFORM VARIABLES */
#define MAX_PLAT 1536 /* Max height platform can goto. */
#define MIN_PLAT 0 /* Min height platform can goto. */
#define PLAT_INC 128 /* How far platform moves per push */
#define PLAT_SPEED 4 /* Speed platform moves up and down */
#define PLAT_WAIT 5 /* How long you got to wait for platform to reset */
#define START_HEIGHT 1024 /* Starting height of platform */
/* MISC DEFINES */
#define MAX_ANGLE 90 /* Maximum up velocity */
#define MIN_ANGLE 3 /* Minimum down velocity */
#define MAX_SPEED 99 /* Fastest you can shoot an object */
#define MIN_SPEED 20 /* Slowest you can shoot an object */
/* DISPLAY DEFINES */
#define HORIZONTAL 1
#define VERTICAL 2
#define SPEED 3
/* CANNON VARIABLES */
int P1_Shooting,P1_Moving,P1_Speed,P1_Horz,P1_Vert,P1_Bull,P1_Height,P1_Angle;
int P2_Shooting,P2_Moving,P2_Speed,P2_Horz,P2_Vert,P2_Bull,P2_Height,P2_Angle;
int P3_Shooting,P3_Moving,P3_Speed,P3_Horz,P3_Vert,P3_Bull,P3_Height,P3_Angle;
int P4_Shooting,P4_Moving,P4_Speed,P4_Horz,P4_Vert,P4_Bull,P4_Height,P4_Angle;
/* FOUND A WAY TO GET MORE VARIABLES. DECLARE THEM AS 'WORLD'! :) " */
world int 1:DigitBusy1,2:DigitBusy2,3:DigitBusy3,4:DigitBusy4;
script 0 OPEN
{
int SecTag,Z;
delay(1*SECONDS);
printbold(s:"LET THE SLAUGHTER BEGIN!");
P1_Height=START_HEIGHT;
P2_Height=START_HEIGHT;
P3_Height=START_HEIGHT;
P4_Height=START_HEIGHT;
/* SET PLATFORMS AT RANDOM HEIGHTS */
SecTag=1;
while(SecTag!=5)
{
Z=random(0,4)*PLAT_INC;
if(random(1,100)>50)
{
Floor_RaiseByValue(SecTag,64,Z);
}
else
{
Floor_LowerByValue(SecTag,64,Z);
Z=-Z;
}
/* UPDATE THE PLAYERS REAL HEIGHT */
switch(SecTag)
{
case 1:
{
P1_Height=P1_Height+Z;
break;
}
case 2:
{
P2_Height=P2_Height+Z;
break;
}
case 3:
{
P3_Height=P3_Height+Z;
break;
}
case 4:
{
P4_Height=P4_Height+Z;
break;
}
}
SecTag++;
}
delay(2*SECONDS);
/* RANDOMIZE INITIAL CANNON STATS */
P1_Speed=random(20,126);
P1_Horz=random(0,122);
P1_Vert=random(10,42);
P1_Bull=T_FIREBALL1;
P1_Angle=122-P1_Horz;
P2_Speed=random(20,126);
P2_Horz=random(70,250);
P2_Vert=random(10,42);
P2_Bull=T_FIREBALL1;
P2_Angle=250-P2_Horz;
P3_Speed=random(20,126);
P3_Horz=random(134,255);
P3_Vert=random(10,42);
P3_Bull=T_FIREBALL1;
P3_Angle=314-P3_Horz;
P4_Speed=random(20,126);
P4_Horz=random(6,186);
P4_Vert=random(10,42);
P4_Bull=T_FIREBALL1;
P4_Angle=186-P4_Horz;
delay(1* SECONDS);
/* Initialize the digital displays */
ACS_Execute(241,1,HORIZONTAL,0,0);
delay(DISPLAY_DELAY);
ACS_Execute(241,1,VERTICAL,0,0);
delay(DISPLAY_DELAY);
ACS_Execute(241,1,SPEED,0,0);
delay(DISPLAY_DELAY);
ACS_Execute(242,1,HORIZONTAL,0,0);
delay(DISPLAY_DELAY);
ACS_Execute(242,1,VERTICAL,0,0);
delay(DISPLAY_DELAY);
ACS_Execute(242,1,SPEED,0,0);
delay(DISPLAY_DELAY);
ACS_Execute(243,1,HORIZONTAL,0,0);
delay(DISPLAY_DELAY);
ACS_Execute(243,1,VERTICAL,0,0);
delay(DISPLAY_DELAY);
ACS_Execute(243,1,SPEED,0,0);
delay(DISPLAY_DELAY);
ACS_Execute(244,1,HORIZONTAL,0,0);
delay(DISPLAY_DELAY);
ACS_Execute(244,1,VERTICAL,0,0);
delay(DISPLAY_DELAY);
ACS_Execute(244,1,SPEED,0,0);
delay(1*SECONDS);
terminate;
}
/* PLAYER 1 ANGLES OF FIRE ARE 0-96 & 224-255 */
script 1 (int P1_Switch)
{
int Var,NewHorz,Shots;
switch(P1_Switch)
{
case FIRE:
{
if(P1_Shooting==0)
{
P1_Shooting=1;
thingsound(1,"FireDemonAttack",127);
while(Shots<MAX_SHOTS)
{
/* ALLOW FOR VARIANCE RANDOM ERRORS */
Var=random(0,VARIANCE);
if(random(1,100)>50)
Var=-Var;
NewHorz=P1_Horz+Var;
if(NewHorz>255)
NewHorz=NewHorz-256;
if(NewHorz<0)
NewHorz=NewHorz+256;
delay(TIME_DELAY);
/* FIRE THAT SUCKER OFF! */
Thing_ProjectileGravity(1,P1_Bull,NewHorz,P1_Speed*2,P1_Vert*2);
Shots++;
}
delay(FIRE_DELAY*SECONDS);
P1_Shooting=0;
terminate;
}
break;
}
case HZ_UP:
{
if(P1_Horz<122)
{
P1_Horz++;
P1_Angle--;
ACS_Execute(241,1,HORIZONTAL,0,0);
}
else
{
if(P1_Horz!=122)
{
P1_Horz++;
P1_Angle--;
if(P1_Horz>255)
{
P1_Horz=0;
}
ACS_Execute(241,1,HORIZONTAL,0,0);
}
}
break;
}
case HZ_DN:
{
if(P1_Horz>198)
{
P1_Horz--;
P1_Angle++;
ACS_Execute(241,1,HORIZONTAL,0,0);
}
else
{
if(P1_Horz!=198)
{
P1_Horz--;
P1_Angle++;
if(P1_Horz<0)
{
P1_Horz=255;
}
ACS_Execute(241,1,HORIZONTAL,0,0);
}
}
break;
}
case VT_UP:
{
if(P1_Vert<MAX_ANGLE)
{
P1_Vert++;
ACS_Execute(241,1,VERTICAL,0,0);
}
break;
}
case VT_DN:
{
if(P1_Vert>MIN_ANGLE)
{
P1_Vert--;
ACS_Execute(241,1,VERTICAL,0,0);
}
break;
}
case SP_UP:
{
if(P1_Speed<MAX_SPEED)
{
P1_Speed++;
ACS_Execute(241,1,SPEED,0,0);
}
break;
}
case SP_DN:
{
if(P1_Speed>MIN_SPEED)
{
P1_Speed--;
ACS_Execute(241,1,SPEED,0,0);
}
break;
}
case OBJ:
{
if(P1_Bull==T_RIPPERBALL)
{
P1_Bull=T_FIREBALL1;
break;
}
if(P1_Bull==T_FIREBALL1)
{
P1_Bull=T_POISONDART;
break;
}
if(P1_Bull==T_POISONDART)
{
P1_Bull=T_BLADE;
break;
}
if(P1_Bull==T_BLADE)
{
P1_Bull=T_ARROW;
break;
}
if(P1_Bull==T_ARROW)
{
P1_Bull=T_ICESHARD;
break;
}
if(P1_Bull==T_ICESHARD)
{
P1_Bull=T_MORPHBLAST;
break;
}
if(P1_Bull==T_MORPHBLAST)
{
P1_Bull=T_RIPPERBALL;
break;
}
}
case PL_UP:
{
if(P1_Moving==0)
{
P1_Moving=1;
ACS_Execute(251,1,UP,0,0);
}
break;
}
case PL_DN:
{
if(P1_Moving==0)
{
P1_Moving=1;
ACS_Execute(251,1,DN,0,0);
}
break;
}
}
/*print(s:"P1) ROT:",d:P1_Horz,s:" ALT:",d:P1_Vert,s:" VEL:",d:P1_Speed);*/
delay(BUTTON_DELAY);
terminate;
}
/* PLAYER 2 ANGLES OF FIRE ARE 96-224 */
script 2 (int P2_Switch)
{
int Var,NewHorz,Shots;
switch(P2_Switch)
{
case FIRE:
{
if(P2_Shooting==0)
{
P2_Shooting=1;
thingsound(2,"FireDemonAttack",127);
while(Shots<MAX_SHOTS)
{
/* ALLOW FOR SMALL RANDOM ERRORS */
Var=random(0,VARIANCE);
if(random(1,100)>50)
Var=-Var;
NewHorz=P2_Horz+Var;
delay(TIME_DELAY);
/* FIRE THAT SUCKER OFF! */
Thing_ProjectileGravity(2,P2_Bull,NewHorz,P2_Speed*2,P2_Vert*2);
Shots++;
}
delay(FIRE_DELAY*SECONDS);
P2_Shooting=0;
terminate;
}
break;
}
case HZ_UP:
{
if(P2_Horz<250)
{
P2_Horz++;
P2_Angle--;
ACS_Execute(242,1,HORIZONTAL,0,0);
}
break;
}
case HZ_DN:
{
if(P2_Horz>70)
{
P2_Horz--;
P2_Angle++;
ACS_Execute(242,1,HORIZONTAL,0,0);
}
break;
}
case VT_UP:
{
if(P2_Vert<MAX_ANGLE)
{
P2_Vert++;
ACS_Execute(242,1,VERTICAL,0,0);
}
break;
}
case VT_DN:
{
if(P2_Vert>MIN_ANGLE)
{
P2_Vert--;
ACS_Execute(242,1,VERTICAL,0,0);
}
break;
}
case SP_UP:
{
if(P2_Speed<MAX_SPEED)
{
P2_Speed++;
ACS_Execute(242,1,SPEED,0,0);
}
break;
}
case SP_DN:
{
if(P2_Speed>MIN_SPEED)
{
P2_Speed--;
ACS_Execute(242,1,SPEED,0,0);
}
break;
}
case OBJ:
{
if(P2_Bull==T_RIPPERBALL)
{
P2_Bull=T_FIREBALL1;
break;
}
if(P2_Bull==T_FIREBALL1)
{
P2_Bull=T_POISONDART;
break;
}
if(P2_Bull==T_POISONDART)
{
P2_Bull=T_BLADE;
break;
}
if(P2_Bull==T_BLADE)
{
P2_Bull=T_ARROW;
break;
}
if(P2_Bull==T_ARROW)
{
P2_Bull=T_ICESHARD;
break;
}
if(P2_Bull==T_ICESHARD)
{
P2_Bull=T_MORPHBLAST;
break;
}
if(P2_Bull==T_MORPHBLAST)
{
P2_Bull=T_RIPPERBALL;
break;
}
}
case PL_UP:
{
if(P2_Moving==0)
{
P2_Moving=1;
ACS_Execute(252,1,UP,0,0);
}
break;
}
case PL_DN:
{
if(P2_Moving==0)
{
P2_Moving=1;
ACS_Execute(252,1,DN,0,0);
}
break;
}
}
/*print(s:"P2) ROT:",d:P2_Horz,s:" ALT:",d:P2_Vert,s:" VEL:",d:P2_Speed);*/
delay(BUTTON_DELAY);
terminate;
}
/* PLAYER 3 ANGLES OF FIRE ARE 0-32 & 160-255 */
script 3 (int P3_Switch)
{
int Var,NewHorz,Shots;
switch(P3_Switch)
{
case FIRE:
{
if(P3_Shooting==0)
{
P3_Shooting=1;
thingsound(3,"FireDemonAttack",127);
while(Shots<MAX_SHOTS)
{
/* ALLOW FOR VARIANCE RANDOM ERRORS */
Var=random(0,VARIANCE);
if(random(1,100)>50)
Var=-Var;
NewHorz=P3_Horz+Var;
if(NewHorz>255)
NewHorz=NewHorz-256;
if(NewHorz<0)
NewHorz=NewHorz+256;
delay(TIME_DELAY);
/* FIRE THAT SUCKER OFF! */
Thing_ProjectileGravity(3,P3_Bull,NewHorz,P3_Speed*2,P3_Vert*2);
Shots++;
}
delay(FIRE_DELAY*SECONDS);
P3_Shooting=0;
terminate;
}
break;
}
case HZ_UP:
{
if(P3_Horz<58)
{
P3_Horz++;
P3_Angle--;
ACS_Execute(243,1,HORIZONTAL,0,0);
}
else
{
if(P3_Horz!=58)
{
P3_Horz++;
P3_Angle--;
if(P3_Horz>255)
{
P3_Horz=0;
}
ACS_Execute(243,1,HORIZONTAL,0,0);
}
}
break;
}
case HZ_DN:
{
if(P3_Horz>134)
{
P3_Horz--;
P3_Angle++;
ACS_Execute(243,1,HORIZONTAL,0,0);
}
else
{
if(P3_Horz!=134)
{
P3_Horz--;
P3_Angle++;
if(P3_Horz<0)
{
P3_Horz=255;
}
ACS_Execute(243,1,HORIZONTAL,0,0);
}
}
break;
}
case VT_UP:
{
if(P3_Vert<MAX_ANGLE)
{
P3_Vert++;
ACS_Execute(243,1,VERTICAL,0,0);
}
break;
}
case VT_DN:
{
if(P3_Vert>MIN_ANGLE)
{
P3_Vert--;
ACS_Execute(243,1,VERTICAL,0,0);
}
break;
}
case SP_UP:
{
if(P3_Speed<MAX_SPEED)
{
P3_Speed++;
ACS_Execute(243,1,SPEED,0,0);
}
break;
}
case SP_DN:
{
if(P3_Speed>MIN_SPEED)
{
P3_Speed--;
ACS_Execute(243,1,SPEED,0,0);
}
break;
}
case OBJ:
{
if(P3_Bull==T_RIPPERBALL)
{
P3_Bull=T_FIREBALL1;
break;
}
if(P3_Bull==T_FIREBALL1)
{
P3_Bull=T_POISONDART;
break;
}
if(P3_Bull==T_POISONDART)
{
P3_Bull=T_BLADE;
break;
}
if(P3_Bull==T_BLADE)
{
P3_Bull=T_ARROW;
break;
}
if(P3_Bull==T_ARROW)
{
P3_Bull=T_ICESHARD;
break;
}
if(P3_Bull==T_ICESHARD)
{
P3_Bull=T_MORPHBLAST;
break;
}
if(P3_Bull==T_MORPHBLAST)
{
P3_Bull=T_RIPPERBALL;
break;
}
}
case PL_UP:
{
if(P3_Moving==0)
{
P3_Moving=1;
ACS_Execute(253,1,UP,0,0);
}
break;
}
case PL_DN:
{
if(P3_Moving==0)
{
P3_Moving=1;
ACS_Execute(253,1,DN,0,0);
}
break;
}
}
/*print(s:"P3) ROT:",d:P3_Horz,s:" ALT:",d:P3_Vert,s:" VEL:",d:P3_Speed);*/
delay(BUTTON_DELAY);
terminate;
}
/* PLAYER 4 ANGLES OF FIRE ARE 32-160 */
script 4 (int P4_Switch)
{
int Var,NewHorz,Shots;
switch(P4_Switch)
{
case FIRE:
{
if(P4_Shooting==0)
{
P4_Shooting=1;
thingsound(4,"FireDemonAttack",127);
while(Shots<MAX_SHOTS)
{
/* ALLOW FOR VARIANCE RANDOM ERRORS */
Var=random(0,VARIANCE);
if(random(1,100)>50)
Var=-Var;
NewHorz=P4_Horz+Var;
delay(TIME_DELAY);
/* FIRE THAT SUCKER OFF! */
Thing_ProjectileGravity(4,P4_Bull,NewHorz,P4_Speed*2,P4_Vert*2);
Shots++;
}
delay(FIRE_DELAY*SECONDS);
P4_Shooting=0;
terminate;
}
break;
}
case HZ_UP:
{
if(P4_Horz<186)
{
P4_Horz++;
P4_Angle--;
ACS_Execute(244,1,HORIZONTAL,0,0);
}
break;
}
case HZ_DN:
{
if(P4_Horz>6)
{
P4_Horz--;
P4_Angle++;
ACS_Execute(244,1,HORIZONTAL,0,0);
}
break;
}
case VT_UP:
{
if(P4_Vert<MAX_ANGLE)
{
P4_Vert++;
ACS_Execute(244,1,VERTICAL,0,0);
}
break;
}
case VT_DN:
{
if(P4_Vert>MIN_ANGLE)
{
P4_Vert--;
ACS_Execute(244,1,VERTICAL,0,0);
}
break;
}
case SP_UP:
{
if(P4_Speed<MAX_SPEED)
{
P4_Speed++;
ACS_Execute(244,1,SPEED,0,0);
}
break;
}
case SP_DN:
{
if(P4_Speed>MIN_SPEED)
{
P4_Speed--;
ACS_Execute(244,1,SPEED,0,0);
}
break;
}
case OBJ:
{
if(P4_Bull==T_RIPPERBALL)
{
P4_Bull=T_FIREBALL1;
break;
}
if(P4_Bull==T_FIREBALL1)
{
P4_Bull=T_POISONDART;
break;
}
if(P4_Bull==T_POISONDART)
{
P4_Bull=T_BLADE;
break;
}
if(P4_Bull==T_BLADE)
{
P4_Bull=T_ARROW;
break;
}
if(P4_Bull==T_ARROW)
{
P4_Bull=T_ICESHARD;
break;
}
if(P4_Bull==T_ICESHARD)
{
P4_Bull=T_MORPHBLAST;
break;
}
if(P4_Bull==T_MORPHBLAST)
{
P4_Bull=T_RIPPERBALL;
break;
}
}
case PL_UP:
{
if(P4_Moving==0)
{
P4_Moving=1;
ACS_Execute(254,1,UP,0,0);
}
break;
}
case PL_DN:
{
if(P4_Moving==0)
{
P4_Moving=1;
ACS_Execute(254,1,DN,0,0);
}
break;
}
}
/*print(s:"P4) ROT:",d:P4_Horz,s:" ALT:",d:P4_Vert,s:" VEL:",d:P4_Speed);*/
delay(BUTTON_DELAY);
terminate;
}
/* Runs the digital display to display numbers from 0-999 */
script 241 (int Display)
{
switch(Display)
{
case HORIZONTAL:
{
print(d:P1_Angle);
if(DigitBusy1==1)
scriptwait(246);
ACS_Execute(246,1,3,P1_Angle%10,0);
scriptwait(246);
ACS_Execute(246,1,2,(P1_Angle/10)%10,0);
scriptwait(246);
ACS_Execute(246,1,1,P1_Angle/100,0);
scriptwait(246);
break;
}
case VERTICAL:
{
if(DigitBusy1==1)
scriptwait(246);
ACS_Execute(246,1,7,P1_Vert%10,0);
scriptwait(246);
ACS_Execute(246,1,6,P1_Vert/10,0);
scriptwait(246);
break;
}
case SPEED:
{
if(DigitBusy1==1)
scriptwait(246);
ACS_Execute(246,1,5,P1_Speed%10,0);
scriptwait(246);
ACS_Execute(246,1,4,P1_Speed/10,0);
scriptwait(246);
break;
}
}
terminate;
}
script 242 (int Display)
{
switch(Display)
{
case HORIZONTAL:
{
if(DigitBusy2==1)
scriptwait(247);
ACS_Execute(247,1,10,P2_Angle%10,0);
scriptwait(247);
ACS_Execute(247,1,9,(P2_Angle/10)%10,0);
scriptwait(247);
ACS_Execute(247,1,8,P2_Angle/100,0);
scriptwait(247);
break;
}
case VERTICAL:
{
if(DigitBusy2==1)
scriptwait(247);
ACS_Execute(247,1,14,P2_Vert%10,0);
scriptwait(247);
ACS_Execute(247,1,13,P2_Vert/10,0);
scriptwait(247);
break;
}
case SPEED:
{
if(DigitBusy2==1)
scriptwait(247);
ACS_Execute(247,1,12,P2_Speed%10,0);
scriptwait(247);
ACS_Execute(247,1,11,P2_Speed/10,0);
scriptwait(247);
break;
}
}
terminate;
}
script 243 (int Display)
{
switch(Display)
{
case HORIZONTAL:
{
if(DigitBusy3==1)
scriptwait(248);
ACS_Execute(248,1,17,P3_Angle%10,0);
scriptwait(248);
ACS_Execute(248,1,16,(P3_Angle/10)%10,0);
scriptwait(248);
ACS_Execute(248,1,15,P3_Angle/100,0);
scriptwait(248);
break;
}
case VERTICAL:
{
if(DigitBusy3==1)
scriptwait(248);
ACS_Execute(248,1,21,P3_Vert%10,0);
scriptwait(248);
ACS_Execute(248,1,20,P3_Vert/10,0);
scriptwait(248);
break;
}
case SPEED:
{
if(DigitBusy3==1)
scriptwait(248);
ACS_Execute(248,1,19,P3_Speed%10,0);
scriptwait(248);
ACS_Execute(248,1,18,P3_Speed/10,0);
scriptwait(248);
break;
}
}
terminate;
}
script 244 (int Display)
{
switch(Display)
{
case HORIZONTAL:
{
if(DigitBusy4==1)
scriptwait(249);
ACS_Execute(249,1,24,P4_Angle%10,0);
scriptwait(249);
ACS_Execute(249,1,23,(P4_Angle/10)%10,0);
scriptwait(249);
ACS_Execute(249,1,22,P4_Angle/100,0);
scriptwait(249);
break;
}
case VERTICAL:
{
if(DigitBusy4==1)
scriptwait(249);
ACS_Execute(249,1,28,P4_Vert%10,0);
scriptwait(249);
ACS_Execute(249,1,27,P4_Vert/10,0);
scriptwait(249);
break;
}
case SPEED:
{
if(DigitBusy4==1)
scriptwait(249);
ACS_Execute(249,1,26,P4_Speed%10,0);
scriptwait(249);
ACS_Execute(249,1,25,P4_Speed/10,0);
scriptwait(249);
break;
}
}
terminate;
}
/* CHANGES THE TEXTURE TO THE PROPER NUMBER */
script 246 (int Line,int Digit)
{
DigitBusy1=1;
switch(Digit)
{
case 0:
setlinetexture(Line,SIDE_FRONT,TEXTURE_BOTTOM,"sewer01");
break;
case 1:
setlinetexture(Line,SIDE_FRONT,TEXTURE_BOTTOM,"sewer02");
break;
case 2:
setlinetexture(Line,SIDE_FRONT,TEXTURE_BOTTOM,"sewer03");
break;
case 3:
setlinetexture(Line,SIDE_FRONT,TEXTURE_BOTTOM,"sewer04");
break;
case 4:
setlinetexture(Line,SIDE_FRONT,TEXTURE_BOTTOM,"sewer05");
break;
case 5:
setlinetexture(Line,SIDE_FRONT,TEXTURE_BOTTOM,"sewer06");
break;
case 6:
setlinetexture(Line,SIDE_FRONT,TEXTURE_BOTTOM,"sewer07");
break;
case 7:
setlinetexture(Line,SIDE_FRONT,TEXTURE_BOTTOM,"sewer08");
break;
case 8:
setlinetexture(Line,SIDE_FRONT,TEXTURE_BOTTOM,"sewer09");
break;
case 9:
setlinetexture(Line,SIDE_FRONT,TEXTURE_BOTTOM,"sewer10");
break;
}
DigitBusy1=0;
terminate;
}
script 247 (int Line,int Digit)
{
DigitBusy2=1;
switch(Digit)
{
case 0:
setlinetexture(Line,SIDE_FRONT,TEXTURE_BOTTOM,"sewer01");
break;
case 1:
setlinetexture(Line,SIDE_FRONT,TEXTURE_BOTTOM,"sewer02");
break;
case 2:
setlinetexture(Line,SIDE_FRONT,TEXTURE_BOTTOM,"sewer03");
break;
case 3:
setlinetexture(Line,SIDE_FRONT,TEXTURE_BOTTOM,"sewer04");
break;
case 4:
setlinetexture(Line,SIDE_FRONT,TEXTURE_BOTTOM,"sewer05");
break;
case 5:
setlinetexture(Line,SIDE_FRONT,TEXTURE_BOTTOM,"sewer06");
break;
case 6:
setlinetexture(Line,SIDE_FRONT,TEXTURE_BOTTOM,"sewer07");
break;
case 7:
setlinetexture(Line,SIDE_FRONT,TEXTURE_BOTTOM,"sewer08");
break;
case 8:
setlinetexture(Line,SIDE_FRONT,TEXTURE_BOTTOM,"sewer09");
break;
case 9:
setlinetexture(Line,SIDE_FRONT,TEXTURE_BOTTOM,"sewer10");
break;
}
DigitBusy2=0;
terminate;
}
script 248 (int Line,int Digit)
{
DigitBusy3=1;
switch(Digit)
{
case 0:
setlinetexture(Line,SIDE_FRONT,TEXTURE_BOTTOM,"sewer01");
break;
case 1:
setlinetexture(Line,SIDE_FRONT,TEXTURE_BOTTOM,"sewer02");
break;
case 2:
setlinetexture(Line,SIDE_FRONT,TEXTURE_BOTTOM,"sewer03");
break;
case 3:
setlinetexture(Line,SIDE_FRONT,TEXTURE_BOTTOM,"sewer04");
break;
case 4:
setlinetexture(Line,SIDE_FRONT,TEXTURE_BOTTOM,"sewer05");
break;
case 5:
setlinetexture(Line,SIDE_FRONT,TEXTURE_BOTTOM,"sewer06");
break;
case 6:
setlinetexture(Line,SIDE_FRONT,TEXTURE_BOTTOM,"sewer07");
break;
case 7:
setlinetexture(Line,SIDE_FRONT,TEXTURE_BOTTOM,"sewer08");
break;
case 8:
setlinetexture(Line,SIDE_FRONT,TEXTURE_BOTTOM,"sewer09");
break;
case 9:
setlinetexture(Line,SIDE_FRONT,TEXTURE_BOTTOM,"sewer10");
break;
}
DigitBusy3=0;
terminate;
}
script 249 (int Line,int Digit)
{
DigitBusy4=1;
switch(Digit)
{
case 0:
setlinetexture(Line,SIDE_FRONT,TEXTURE_BOTTOM,"sewer01");
break;
case 1:
setlinetexture(Line,SIDE_FRONT,TEXTURE_BOTTOM,"sewer02");
break;
case 2:
setlinetexture(Line,SIDE_FRONT,TEXTURE_BOTTOM,"sewer03");
break;
case 3:
setlinetexture(Line,SIDE_FRONT,TEXTURE_BOTTOM,"sewer04");
break;
case 4:
setlinetexture(Line,SIDE_FRONT,TEXTURE_BOTTOM,"sewer05");
break;
case 5:
setlinetexture(Line,SIDE_FRONT,TEXTURE_BOTTOM,"sewer06");
break;
case 6:
setlinetexture(Line,SIDE_FRONT,TEXTURE_BOTTOM,"sewer07");
break;
case 7:
setlinetexture(Line,SIDE_FRONT,TEXTURE_BOTTOM,"sewer08");
break;
case 8:
setlinetexture(Line,SIDE_FRONT,TEXTURE_BOTTOM,"sewer09");
break;
case 9:
setlinetexture(Line,SIDE_FRONT,TEXTURE_BOTTOM,"sewer10");
break;
}
DigitBusy4=0;
terminate;
}
/* MOVE THE PLATFORMS UP AND DOWN */
script 251 (int Direction)
{
if(Direction==UP)
{
if(P1_Height<MAX_PLAT)
{
P1_Height=P1_Height+PLAT_INC;
Floor_RaiseByValue(1,PLAT_SPEED,PLAT_INC);
tagwait(1);
}
}
else
{
if(P1_Height>MIN_PLAT)
{
P1_Height=P1_Height-PLAT_INC;
Floor_LowerByValue(1,PLAT_SPEED,PLAT_INC);
tagwait(1);
}
}
delay(PLAT_WAIT*SECONDS);
P1_Moving=0;
terminate;
}
script 252 (int Direction)
{
if(Direction==UP)
{
if(P2_Height<MAX_PLAT)
{
P2_Height=P2_Height+PLAT_INC;
Floor_RaiseByValue(2,PLAT_SPEED,PLAT_INC);
tagwait(2);
}
}
else
{
if(P2_Height>MIN_PLAT)
{
P2_Height=P2_Height-PLAT_INC;
Floor_LowerByValue(2,PLAT_SPEED,PLAT_INC);
tagwait(2);
}
}
delay(PLAT_WAIT*SECONDS);
P2_Moving=0;
terminate;
}
script 253 (int Direction)
{
if(Direction==UP)
{
if(P3_Height<MAX_PLAT)
{
P3_Height=P3_Height+PLAT_INC;
Floor_RaiseByValue(3,PLAT_SPEED,PLAT_INC);
tagwait(3);
}
}
else
{
if(P3_Height>MIN_PLAT)
{
P3_Height=P3_Height-PLAT_INC;
Floor_LowerByValue(3,PLAT_SPEED,PLAT_INC);
tagwait(3);
}
}
delay(PLAT_WAIT*SECONDS);
P3_Moving=0;
terminate;
}
script 254 (int Direction)
{
if(Direction==UP)
{
if(P4_Height<MAX_PLAT)
{
P4_Height=P4_Height+PLAT_INC;
Floor_RaiseByValue(4,PLAT_SPEED,PLAT_INC);
tagwait(4);
}
}
else
{
if(P4_Height>MIN_PLAT)
{
P4_Height=P4_Height-PLAT_INC;
Floor_LowerByValue(4,PLAT_SPEED,PLAT_INC);
tagwait(4);
}
}
delay(PLAT_WAIT*SECONDS);
P4_Moving=0;
terminate;
}